package com.qd.common.panda.domain.entity.carpark;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * @author sjk
 */
@Data
@Accessors(chain = true)
public class GasCalculatePriceDTO {
    public static final Double MAX_AMOUNT = 5000D;
    public static final Double MIN_AMOUNT = 1D;
    /**
     * 加油站ID
     */
    @NotBlank(message = "加油站ID不能为空")
    @Size(max = 50, message = "加油站ID长度不能超过{max}位")
    private String parkId;
    /**
     * 油号
     */
//    @NotNull(message = "油号不能为空")
    private Integer octaneNumber;
    /**
     * 枪号
     */
    @NotBlank(message = "枪号不能为空")
    @JsonProperty("nozzleNumber")
    private String nozzleNumber;
    /**
     * 价格
     */
    @NotBlank(message = "金额不能为空")
    @Size(max = 10, message = "金额长度不能超过{max}位")
    private String price;
    /**
     * 积分
     */
    private String integral;
    /**
     * 卷ID
     */
    private String cardId;
    /**
     * 卷类型
     */
    private String cardType;
    /**
     * 使用品牌
     */
    private String useBrand;
    public void freeData() {
        this.parkId = null;
        this.octaneNumber = null;
        this.nozzleNumber = null;
        this.price = null;
        this.integral = null;
        this.cardId = null;
        this.cardType = null;
        this.useBrand = null;
    }
}
